﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="AjaxSample.aspx.cs" Inherits="sample_AjaxSample" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <div id="content">
        Loading...
    </div>
    <br />
    <input type="button" onclick="return Increase();" value="Increase" />
        <script type="text/javascript">
        function Increase()
        {
            new Ajax.Request('<%= ResolveUrl("~/ajax/Increase.aspx") %>', {
              method: 'post',
              parameters: {newpass: 123456789},
              onFailure: function(){ alert('Something went wrong...') } 
              });

            new Ajax.Updater('content', '<%= ResolveUrl("~/ajax/Test.aspx") %>', { method: 'get' });
            return false;
        }
        new Ajax.Updater('content', '<%= ResolveUrl("~/ajax/Test.aspx") %>', { method: 'get' });
    </script>
    </div>
    </form>
</body>
</html>
